﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LearnDrive
{
    public partial class frmRand : Form
    {
        public frmRand()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            AShelp.Save(trackBar1.Value.ToString(), "", "", "", "rand");
            MessageBox.Show("设置成功!");
            this.Close();
        }

        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            this.Text = "设置选项随机比例---" + trackBar1.Value;
        }

        private void frmRand_Load(object sender, EventArgs e)
        {
            List<string> ls = AShelp.Load("rand");
            if (ls != null)
            {
                int i = 5;
                int.TryParse(ls[0],out i);
                trackBar1.Value = i;
            }
            this.Text = "设置选项随机比例---" + trackBar1.Value;
        }
    }
}
